home *** CD-ROM | disk | FTP | other *** search
/ Hunter 2006 / Hunter 2006.iso / soft / sleipnir241.exe / {app} / scripts / ƒŠƒ“ƒNˆ— / IE‚ÅŠJ‚­.js < prev    next >
Text File  |  2006-06-15  |  1KB  |  65 lines

  1. /***************************************************************
  2.  
  3.                     IEé┼èJé¡üi2002/09/09üj
  4.                                         written by sleepy
  5.  
  6. ***************************************************************/
  7.  
  8.     var obj, document, id;
  9.  
  10.     obj = new ActiveXObject("Sleipnir.API");
  11.     id = obj.GetDocumentID(obj.ActiveIndex);
  12.     document = obj.GetDocumentObject(id);
  13.  
  14.     if (document != null){
  15.         var frame, target, adr, wait, objIE;
  16.  
  17.         if (obj.IsBusy(id)){
  18.             do {
  19.                 WScript.Sleep(500);
  20.                 wait = wait + 500;
  21.             } while (obj.IsBusy(id) && (wait < 10000));// 10òbé┼â^âCâÇâAâEâg
  22.         }
  23.  
  24.         objIE = WScript.CreateObject("InternetExplorer.Application");
  25.         frames = document.frames;
  26.         if (frames.length != 0){
  27.             for (i=0; i<frames.length; i++){
  28.                 try {
  29.                     target = frames(i).document.activeElement;
  30.                     if (target.href != null){
  31.                         adr = target.href;
  32.                     }
  33.                     else {
  34.                         adr = "";
  35.                     }
  36.  
  37.                     if (adr != ""){
  38.                         objIE.Visible = true;
  39.                         objIE.Navigate(adr);
  40.                     }
  41.                 }
  42.                 catch(error) {
  43.                 }
  44.             }
  45.         }
  46.  
  47.         target = document.activeElement;
  48.         if (target.href != null){
  49.             adr = target.href;
  50.         }
  51.         else {
  52.             adr = "";
  53.         }
  54.  
  55.         if (adr != ""){
  56.             objIE.Visible = true;
  57.             objIE.Navigate(adr);
  58.         }
  59.  
  60.         objIE = null;
  61.         document = null;
  62.     }
  63.  
  64.     obj = null;
  65.